package edu.scau.misp.backend_module.service.impl;

import edu.scau.misp.backend_module.domain.Deal;
import edu.scau.misp.backend_module.mapper.DealMapper;
import edu.scau.misp.backend_module.service.IDealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class DealServiceImpl implements IDealService {
    @Autowired
    private DealMapper dealMapper;
    @Override
    public Deal getDealBySn(Long dealSn) {
        return dealMapper.getDealBySn(dealSn);
    }

    @Override
    public List<Deal> listAllDeal() {
        return dealMapper.listAllDeal();
    }

    @Override
    public List<Deal> selectDealList(Deal deal) {
        return dealMapper.selectDealList(deal);
    }

    @Override
    public int insertDeal(Deal deal) {
        return dealMapper.insertDeal(deal);
    }

    @Override
    public int updateDeal(Deal deal) {
        return dealMapper.updateDeal(deal);
    }

    @Override
    public int deleteDealById(Long dealId) {
        return dealMapper.deleteDealById(dealId);
    }
}
